<?php
include '../model/classModelObjetoDados.php';
include '../model/InterfaceObjeto.php';
//require 'class/model/classModelObjetoDados.php';
//require_once 'class/model/classModelObjetoDados.php';
//include_once 'class/model/classModelObjetoDados.php';

class ControllerCliente implements Objeto{
	private $model;
	private $sql;
	
	public function ControllerCliente(){
		$this->model = new ModelObjetoDados();
	}
	
	public function salvar($obj){
		$this->sql = "INSERT INTO client
		(client_name,
		client_email,
		client_password,
		client_type
		)
		VALUES
		('".$obj->name."',
		'".$obj->email."',
		'".$obj->password."',
		'".$obj->type."'
		);";
		
		echo "<br><br>SQL: ".$this->sql;
		$this->model->salvar($this);
	}
	
	public function deletar($obj){
		$this->model->deletar($obj);
	}
	
	public function consultar($obj){
		$this->model->consultar($obj);
	}
	
	public function atualizar($obj){
		$this->model->atualizar($obj);
	}
	
	public function getSQL(){
		return $this->sql;
	}
	
}

?>